"""copy 模块配置"""

TYPE_VARS = {
    "T": {
        "description": "可拷贝的 Python 类型（通用）",
    },
    "Copyable": {
        "description": "支持 copy() 方法的 Python 类型",
        "constraints": ["Any", "dict", "list", "set"],
        "cpp_method_requirement": "copy",
    },
    "DeepCopyable": {
        "description": "支持 deep_copy() 方法的 Python 类型",
        "constraints": ["Any", "dict", "list", "set"],
        "cpp_method_requirement": "deep_copy",
    },
}
CONFIG = {
    "copy": {
        "is_module": True,
        "includes": [],
        "functions": {
            "copy": {
                "signatures": [
                    "copy(x: Copyable) -> Copyable",
                    "copy(x: T) -> T",
                ],
                "templates": [
                    "{x}.copy()",
                    "{x}",
                ],
                "includes": [
                    "mcpy/builtins.h",
                ],
                "priority": 1,
            },
            "deepcopy": {
                "signatures": [
                    "deepcopy(x: any) -> any",  # any 类型专用签名（小写）
                    "deepcopy(x: Any) -> Any",  # Any 类型专用签名（大写）
                    "deepcopy(x: DeepCopyable) -> DeepCopyable",
                    "deepcopy(x: T) -> T",
                ],
                "templates": [
                    "{x}.deep_copy()",  # any (mc::variant) 调用 deep_copy()
                    "{x}.deep_copy()",  # Any (mc::variant) 调用 deep_copy()
                    "{x}.deep_copy()",
                    "{x}",
                ],
                "includes": [
                    "mcpy/builtins.h",
                ],
                "priority": 1,
            },
        },
    },
}
